package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Goods;
import com.edu.bean.Page;
import com.edu.dao.GoodsDao;
import com.edu.dao.impl.GoodsDaoImpl;
import com.edu.service.GoodsService;

public class GoodsServiceImpl implements GoodsService {
	GoodsDao gd = new GoodsDaoImpl();
	@Override
	public Page<Goods> SelectGoods(int pageNum,int pageSize) {
		List<Goods> goodsList = gd.SelectGoods(pageNum, pageSize);
		int rows = gd.selectAllGoodsNum();
		Page<Goods> page = new Page(goodsList,pageNum,pageSize,rows);
		return page;

	}
	@Override
	public int deleteGoodsId(int goodsId) {
		// TODO Auto-generated method stub
		return gd.deleteGoodsId(goodsId);
	}

}
